import { useCookies } from "@vueuse/integrations/useCookies";
const cookie = useCookies();
const tokenKey = "token";
const languageCode = "languageCode";

// 设置token
export function setToken(value) {
  return cookie.set(tokenKey,value);
}
// 获得token
export function getToken() {
  return cookie.get(tokenKey);
}
// 删除token
export function removeToken() {
  return cookie.remove(tokenKey);
}

// 设置languageCode
export function setLanguageCode(value) {
  return cookie.set(languageCode,value);
}
// 获得languageCode
export function getLanguageCode() {
  return cookie.get(languageCode);
}
// 删除languageCode
export function removeLanguageCode() {
  return cookie.remove(languageCode);
}

// 设置储存
export function setKey(tokenKey, value) {
  return cookie.set(tokenKey,value);
}
// 获得
export function getKey(tokenKey) {
  return cookie.get(tokenKey);
}
// 删除
export function removeKey(tokenKey) {
  return cookie.remove(tokenKey);
}
